package com.bjwl.service.impl;

import com.bjwl.dao.AttendMapper;
import com.bjwl.pojo.Attend;
import com.bjwl.pojo.Settlement;
import com.bjwl.service.AttendService;
import com.bjwl.utils.PageBean;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @Author: czc
 * @Date:Create：in 2020/5/20 11:34
 * @Description:
 * @Modified By：
 * @Version: 1.0
 */
@Service
public class AttendServiceImpl implements AttendService {

    @Autowired
    private AttendMapper attendMapper;

    @Override
    public void addAttend(Attend attend) {
        attendMapper.addAttend(attend);
    }

    @Override
    public PageBean<Attend> findAllAttend(Integer pageNum, Integer bsid, String wstarttime, String wendtime, String staffname) {
        PageBean<Attend> pageBean = new PageBean<Attend>(pageNum,10,attendMapper.attendPaging(bsid,wstarttime,wendtime,staffname));
        pageBean.setData(attendMapper.findAllAtend(pageBean,bsid,wstarttime,wendtime,staffname));
        return pageBean;
    }
}
